package com.pmpd.activity.vo.api;

import com.pmpd.activity.bo.api.ActivityWinningUserBo;
import org.apache.commons.lang.StringUtils;

/**
 * @Author liuying
 * @Description 中奖人信息返回
 * @Date 16:39 2018/6/8
 */
public class ApiActivityWinningVo {
    private String nickname;

    private String account;

    public ApiActivityWinningVo(ActivityWinningUserBo user){
        this.nickname = user.getNickname();
        if (StringUtils.isNotEmpty(user.getEmail())){
            this.account = user.getEmail();
        }
        if (StringUtils.isNotEmpty(user.getPhone())){
            this.account = user.getPhone();
        }
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }
}
